
********************************************************************
********************Repliation file for*****************************
***Women's Empowerment, Technological Change, and Economic Growth***
********************************************************************

**NB: Remember to change directories throughout the do file for using and saving this replication dataset

use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual_161121.dta", clear
keep country_id country_name year s_far_Maddison_gdppc_1990_estima e_migdppcln s_tfp_lntfp v2x_gender v2x_polyarchy v2clrspct s_mil_resdep2 s_far_Maddison_pop_estimate v2x_gencl v2x_gencs v2x_genpp e_lexical_index e_regionpol_6C e_miurbani s_mil_agro s_mil_van_familyf last10domestic intwar10yr civwar10yr yearsindeptot
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

sort country_id year
xtset country_id year

***********************
***Variable creation***
***********************

by country_id, sort: generate e_migdpgro = (s_far_Maddison_gdppc_1990_estima-L.s_far_Maddison_gdppc_1990_estima)*100
sort country_id year

by country_id, sort : ipolate e_migdppcln year, generate(e_migdppclni)
sort country_id year

by country_id, sort : generate e_migdpgroi = 100*(exp(e_migdppclni) - exp(L.e_migdppclni))/exp(L.e_migdppclni)
sort country_id year

summarize e_migdpgroi e_migdpgro, detail

by country_id, sort : ipolate s_tfp_lntfp year, generate(s_tfp_lntfpi)
sort country_id year
summarize s_tfp_lntfp s_tfp_lntfpi

summarize v2x_gender, detail

**generate quartiles on index
generate gender1 =.
replace gender1= 0 if v2x_gender!=.
replace gender1 =1 if v2x_gender!=. & v2x_gender<0.172

generate gender2 =.
replace gender2= 0 if v2x_gender!=.
replace gender2 =1 if v2x_gender!=. & v2x_gender>0.171999999 & v2x_gender<0.344

generate gender3 =.
replace gender3= 0 if v2x_gender!=.
replace gender3 =1 if v2x_gender!=. & v2x_gender>0.3439999999 & v2x_gender<0.611

generate gender4 =.
replace gender4= 0 if v2x_gender!=.
replace gender4 =1 if v2x_gender!=. & v2x_gender>0.6109999999

correlate gender*
summarize e_migdpgroi e_migdpgro s_tfp_lntfpi if gender1==1
summarize e_migdpgroi e_migdpgro s_tfp_lntfpi if gender2==1
summarize e_migdpgroi e_migdpgro s_tfp_lntfpi if gender3==1
summarize e_migdpgroi e_migdpgro s_tfp_lntfpi if gender4==1

generate gender_quartile =.
replace gender_quartile=1 if gender1 ==1
replace gender_quartile=2 if gender2 ==1
replace gender_quartile=3 if gender3 ==1
replace gender_quartile=4 if gender4 ==1

generate democracy =.
replace democracy=0 if e_lexical_index<6 & e_lexical_index!=.
replace democracy=1 if e_lexical_index==6

generate democracya =.
replace democracya=0 if e_lexical_index<5 & e_lexical_index!=.
replace democracya=1 if e_lexical_index==5
replace democracya=1 if e_lexical_index==6

generate wwii=.
replace wwii=1 if year>1945
replace wwi=0 if year<1946

generate west=.
replace west=0 if e_regionpol_6C!=5
replace west=1 if e_regionpol_6C==5

*********************************
***Figures & Tables main paper***
*********************************

************
**Figure 2**
************

twoway (scatter e_migdppclni v2x_gender if year==1830, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit e_migdppclni v2x_gender if year==1830, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM1.gph"
twoway (scatter e_migdppclni v2x_gender if year==1900, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit e_migdppclni v2x_gender if year==1900, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM2.gph"
twoway (scatter e_migdppclni v2x_gender if year==1950, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit e_migdppclni v2x_gender if year==1950, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM3.gph"
twoway (scatter e_migdppclni v2x_gender if year==2000, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit e_migdppclni v2x_gender if year==2000, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM4.gph"
graph combine "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM1.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM2.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM3.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterM4.gph", cols(2) imargin(top_bottom) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScattersM.gph"
graph export "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScattersM.pdf", as(pdf) replace

************
**Figure 3**
************
twoway (scatter s_far_Maddison_gdppc_1990_estima v2x_gender if year==1830, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit s_far_Maddison_gdppc_1990_estima v2x_gender if year==1830, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF1.gph"
twoway (scatter s_far_Maddison_gdppc_1990_estima v2x_gender if year==1900, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit s_far_Maddison_gdppc_1990_estima v2x_gender if year==1900, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF2.gph"
twoway (scatter s_far_Maddison_gdppc_1990_estima v2x_gender if year==1950, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit s_far_Maddison_gdppc_1990_estima v2x_gender if year==1950, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF3.gph"
twoway (scatter s_far_Maddison_gdppc_1990_estima v2x_gender if year==2000, mcolor(black) mlabel(country_name) mlabsize(vsmall) mlabcolor(black)) (lfit s_far_Maddison_gdppc_1990_estima v2x_gender if year==2000, fcolor(none) alcolor(black)), ytitle(Ln GDP per capita) ytitle(, size(small)) xtitle(Female Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF4.gph"
graph combine "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF1.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF2.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF3.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScatterF4.gph", cols(2) imargin(top_bottom) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
graph save Graph "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScattersF.gph"
graph export "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\ScattersF.pdf", as(pdf) replace

***********
**Table 1**
***********
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgroi v2x_gender e_migdppclni  i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg F5.e_migdppclni v2x_gender e_migdppclni  i.year, fe cluster(country_id)
estimates store d
 
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend


xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store e
xtreg F.e_migdppclni v2x_gender e_migdppclni  i.year, fe cluster(country_id)
estimates store f

estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

************
**Figure 4**
************

xtreg L10.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg L5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg L3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg L1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store e
xtreg F1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store g
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store h
xtreg F10.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store i
coefplot (a, label(t-10)) (b, label(t-5)) (c, label(t-3)) (d, label(t-1)) (e, label(t=0)) (f, label(t+1)) (g, label(t+3)) (h, label(t+5)) (i, label(t+10)), bylabel(Growth measured t years after) keep(v2x_gender) vertical yline(0) 
**Then some manual edits to color scheme, labels, etc.

***********
**Table 3**
***********

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg F1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg F10.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima v2x_polyarchy i.year, fe cluster(country_id)
estimates store e
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima v2clrspct i.year, fe cluster(country_id)
estimates store f
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year s_far_Maddison_pop_estimate, fe cluster(country_id)
estimates store h
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year v2x_polyarchy v2clrspct s_mil_resdep2 s_far_Maddison_pop_estimate, fe cluster(country_id)
estimates store h1
drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store i
xtreg F2.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store j
xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima L. s_far_Maddison_gdppc_1990_estima L2.s_far_Maddison_gdppc_1990_estima L3.s_far_Maddison_gdppc_1990_estima  i.year, fe cluster(country_id)
estimates store k
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender, lag (2 3))  robust artests(3)
estimates store l
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender, lag (2 3))  robust artests(3)
estimates store m
estout a b c d e f g h h1 i j k l m, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**Not in table but checking results for benchmark on reduced nat resource sample:
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year if _est_g==1, fe cluster(country_id)

**Also double-checking whether lagged growth predicts FPE, not reported in table 2, but discussed in text
xtreg L1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
xtreg e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
xtreg L3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
xtreg L5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)

************
**Figure 5**
************

**Top panel
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  i.year if year<1946, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   i.year if year>1945, fe cluster(country_id)
estimates store b
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   i.year if e_regionpol_6C==5, fe cluster(country_id)
estimates store c
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=5, fe cluster(country_id)
estimates store d
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   i.year if democracy==0, fe cluster(country_id)
estimates store e
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  i.year if democracy==1, fe cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (a, label(1789-1945)) (b, label(1946-2010)) (c, label(Western)) (d, label(Non-Western)) (e, label(Autocratic)) (f, label(Democratic)), bylabel(Benchmark)  /// 
||, keep(v2x_gender) vertical yline(0)   byopts(colfirst) 
*Some manual formatting

**Bottom panel
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  if year<1946, cluster(country_id)
estimates store a
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   if year>1945, cluster(country_id)
estimates store b
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima    if e_regionpol_6C==5, cluster(country_id)
estimates store c
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima    if e_regionpol_6C!=5, cluster(country_id)
estimates store d
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  if democracy==0, cluster(country_id)
estimates store e
reg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima    if democracy==1, cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(_cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (a, label(1789-1945)) (b, label(1946-2010)) (c, label(Western)) (d, label(Non-Western)) (e, label(Autocratic)) (f, label(Democratic)), bylabel(Benchmark)  /// 
||, keep(v2x_gender) vertical yline(0)   byopts(colfirst) 
*Some manual formatting

************
**Figure 6**
************
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgro v2x_gencl s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.e_migdpgro v2x_gencs s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg F5.e_migdpgro v2x_genpp s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
estout a b c d, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
summarize v2x_gender v2x_gencl v2x_gencs v2x_genpp
coefplot (a, label(Female Empowerment Index)) (b, label(Civil liberties index)) (c, label(Civil society participation index)) (d, label(Political participation index)), bylabel(Benchmark)  /// 
||, keep(v2x_gender v2x_gencl v2x_gencs v2x_genpp) vertical yline(0)   byopts(colfirst) 
*Some manual formatting


***********
**Table 4**
***********

xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year, fe cluster(country_id)
estimates store a
xtreg F10.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi v2x_polyarchy i.year, fe cluster(country_id)
estimates store c
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi s_mil_agro i.year, fe cluster(country_id)
estimates store e
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi s_far_Maddison_pop_estimate i.year, fe cluster(country_id)
estimates store f
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi civwar10yr i.year, fe cluster(country_id)
estimates store g
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year, fe cluster(country_id)
estimates store h
xtreg F.s_tfp_lntfpi v2x_gender s_tfp_lntfpi v2x_polyarchy i.year, fe cluster(country_id)
estimates store i


estout a b c d e f g h i, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**Checking if resource finding is driven by sample, not in table but mentioned paper.
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi s_mil_resdep2 i.year, fe cluster(country_id)
estimates store d
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year if _est_d==1, fe cluster(country_id) 
estimates store a

***********************
****ONLINE APPENDIX****
***********************
**********
**Tab A1**
**********
summarize e_migdpgro e_migdpgroi  s_far_Maddison_gdppc_1990_estima e_migdppclni s_tfp_lntfpi v2x_gender v2x_gencl v2x_gencs v2x_genpp v2x_polyarchy v2clrspct s_mil_resdep2 s_far_Maddison_pop_estimate

**********
**Fig A1**
**********
histogram v2x_gender, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h1.gph"

histogram v2x_gencl, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h2.gph"

histogram v2x_gencs, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h3.gph"

histogram v2x_genpp, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h4.gph"

histogram  s_far_Maddison_gdppc_1990_estima, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h5.gph"

histogram e_migdppclni, percent fcolor(black) lcolor(none) legend(off) scheme(s2color) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h6.gph"

graph combine "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h6.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h5.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h4.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h3.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h2.gph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\h1.gph", cols(2) graphregion(margin(tiny) fcolor(white) lcolor(none) lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plotregion(margin(medium) fcolor(white) lcolor(none) lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none))

graph save "Graph" "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\histograms.gph"

**********
**Fig A2**
**********
twoway (scatter v2x_polyarchy v2x_gender, mcolor(black) msize(vtiny) mlabcolor(black)) (lfit v2x_polyarchy v2x_gender, fcolor(none) alcolor(black)), ytitle(Democracy) ytitle(, size(small)) xtitle(Women Political Empowerment) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "ScatterD1.gph", replace
twoway (scatter v2x_polyarchy v2x_gencl, mcolor(black)  msize(vtiny) mlabcolor(black)) (lfit v2x_polyarchy v2x_gencl, fcolor(none) alcolor(black)), ytitle(Democracy) ytitle(, size(small)) xtitle(Women Civil Liberties) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "ScatterD2.gph", replace
twoway (scatter v2x_polyarchy v2x_gencs, mcolor(black) msize(vtiny) mlabcolor(black)) (lfit v2x_polyarchy v2x_gencs, fcolor(none) alcolor(black)), ytitle(Democracy) ytitle(, size(small)) xtitle(Women Civil Society Participation) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "ScatterD3.gph", replace
twoway (scatter v2x_polyarchy v2x_genpp, mcolor(black) msize(vtiny) mlabcolor(black)) (lfit v2x_polyarchy v2x_genpp, fcolor(none) alcolor(black)), ytitle(Democracy) ytitle(, size(small)) xtitle(Women Political Participation) xtitle(, size(small)) legend(off) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
graph save Graph "ScatterD4.gph", replace
graph combine "ScatterD1.gph" "ScatterD2.gph" "ScatterD3.gph" "ScatterD4.gph", cols(2) imargin(top_bottom) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
graph export "ScattersD.pdf", as(pdf) replace 

**********
**Fig A3**
**********

xtreg L10.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg L5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg L3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
xtreg L1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store d
xtreg e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store e
xtreg F1.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store f
xtreg F3.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store g
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store h
xtreg F10.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store i
coefplot (a, label(t-10)) (b, label(t-5)) (c, label(t-3)) (d, label(t-1)) (e, label(t=0)) (f, label(t+1)) (g, label(t+3)) (h, label(t+5)) (i, label(t+10)), bylabel(Growth measured t years after) keep(v2x_gender) vertical yline(0) 

**********
**Tab A2**
**********

xtreg F5.e_migdpgroi v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store a
xtreg F1.e_migdpgroi v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store b
xtreg F3.e_migdpgroi v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store c
xtreg F10.e_migdpgroi v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store d
xtreg F5.e_migdpgroi v2x_gender e_migdppclni v2x_polyarchy i.year, fe cluster(country_id)
estimates store e
xtreg F5.e_migdpgroi v2x_gender e_migdppclni v2clrspct i.year, fe cluster(country_id)
estimates store f
xtreg F5.e_migdpgroi v2x_gender e_migdppclni s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F5.e_migdpgroi v2x_gender e_migdppclni i.year s_far_Maddison_pop_estimate, fe cluster(country_id)
estimates store h
xtreg F5.e_migdpgroi v2x_gender e_migdppclni i.year v2x_polyarchy v2clrspct s_mil_resdep2 s_far_Maddison_pop_estimate, fe cluster(country_id)
estimates store h1
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.e_migdppclni v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store i
xtreg F2.e_migdppclni v2x_gender e_migdppclni i.year, fe cluster(country_id)
estimates store j
xtreg F.e_migdppclni v2x_gender e_migdppclni L. e_migdppclni L2.e_migdppclni L3.e_migdppclni  i.year, fe cluster(country_id)
estimates store k
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni i.year, gmm(v2x_gender, lag (2 3))  robust artests(3)
estimates store l
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni L.e_migdppclni i.year, gmm(v2x_gender, lag (2 3))  robust artests(3)
estimates store m
estout a b c d e f g h h1 i j k l m, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _Iy* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**********
**Tab A3**
**********
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima s_mil_resdep2 i.year, fe cluster(country_id)
estimates store g
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year if _est_g==1, fe cluster(country_id)
estimates store g1

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year v2x_polyarchy v2clrspct s_mil_resdep2 s_far_Maddison_pop_estimate, fe cluster(country_id)
estimates store h1
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year if _est_h1==1, fe cluster(country_id)
estimates store h
estout a g1 g h h1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


**********
**Tab A4**
**********

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year democracya, fe cluster(country_id)
estimates store a1
xtreg F5.e_migdpgroi v2x_gender e_migdppclni i.year democracya, fe cluster(country_id)
estimates store b1
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year democracya, fe cluster(country_id)
estimates store c1
xtreg F5.e_migdppclni v2x_gender e_migdppclni i.year democracya, fe cluster(country_id)
estimates store d1
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima democracya, fe cluster(country_id)
estimates store e1
xtreg F.e_migdppclni v2x_gender e_migdppclni  democracya, fe cluster(country_id)
estimates store f1

estout a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**********
**Tab A5**
**********

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year s_mil_agro, fe cluster(country_id)
estimates store b
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year s_mil_van_familyf, fe cluster(country_id)
estimates store c
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year e_miurbani, fe cluster(country_id)
estimates store d
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year yearsindeptot, fe cluster(country_id)
estimates store e
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year intwar10yr, fe cluster(country_id)
estimates store f
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year civwar10yr, fe cluster(country_id)
estimates store g
xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year last10domestic, fe cluster(country_id)
estimates store h


estout a b c d e f g h, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
 

**********
**Tab A6**
**********

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.country_id##c.year, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgroi v2x_gender e_migdppclni  i.country_id##c.year, fe cluster(country_id)
estimates store b
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.country_id##c.year, fe cluster(country_id)
estimates store c
xtreg F5.e_migdppclni v2x_gender e_migdppclni  i.country_id##c.year, fe cluster(country_id)
estimates store d

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima i.year i.country_id##c.year, fe cluster(country_id)
estimates store a1
xtreg F5.e_migdpgroi v2x_gender e_migdppclni i.year i.country_id##c.year, fe cluster(country_id)
estimates store b1
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year i.country_id##c.year, fe cluster(country_id)
estimates store c1
xtreg F5.e_migdppclni v2x_gender e_migdppclni i.year i.country_id##c.year, fe cluster(country_id)
estimates store d1
  
save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend


xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.country_id##c.year, fe cluster(country_id)
estimates store e
xtreg F.e_migdppclni v2x_gender e_migdppclni  i.country_id##c.year, fe cluster(country_id)
estimates store f

xtreg F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year i.country_id##c.year, fe cluster(country_id)
estimates store e1
xtreg F.e_migdppclni v2x_gender e_migdppclni i.year i.country_id##c.year, fe cluster(country_id)
estimates store f1

estout a b c d e f a1 b1 c1 d1 e1 f1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

**********
**Tab A7**
**********

xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender, lag (3 4))  robust artests(3)
estimates store a
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender, lag (3 4))  robust artests(3)
estimates store b
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni i.year, gmm(v2x_gender, lag (3 4))  robust artests(3)
estimates store c
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni L.e_migdppclni i.year, gmm(v2x_gender, lag (3 4))  robust artests(3)
estimates store d
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender s_far_Maddison_gdppc_1990_estima, lag (2 3))  robust artests(3)
estimates store e
xi: xtabond2 F.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima i.year, gmm(v2x_gender s_far_Maddison_gdppc_1990_estima L.s_far_Maddison_gdppc_1990_estima, lag (2 3))  robust artests(3)
estimates store f
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni i.year, gmm(v2x_gender e_migdppclni, lag (2 3))  robust artests(3)
estimates store g
xi: xtabond2 F.e_migdppclni v2x_gender e_migdppclni L.e_migdppclni i.year, gmm(v2x_gender e_migdppclni L.e_migdppclni, lag (2 3))  robust artests(3)
estimates store h
estout a b c d e f g h, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(_I* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N j hansenp ar2p ar3p)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**********
**Tab A8**
**********

xtreg F5.e_migdpgro c.v2x_gender##c.wwii s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
xtreg F5.e_migdpgro c.v2x_gender##c.west s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store b
xtreg F5.e_migdpgro c.v2x_gender##c.democracy s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store c
estout a b c, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


**********
**Tab A9**
**********

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  i.year if year<1946, fe cluster(country_id)
estimates store a
by country_id, sort: egen pre45panel = max(_est_a)
summarize pre45panel
sort country_id year

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   i.year if year>1945, fe cluster(country_id)
estimates store b
by country_id, sort: egen post45panel = max(_est_b)
summarize post45panel
sort country_id year

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima  i.year if year<1946 & pre45panel==1 & post45panel==1, fe cluster(country_id)
estimates store a1

xtreg F5.e_migdpgro v2x_gender s_far_Maddison_gdppc_1990_estima   i.year if year>1945 & pre45panel==1 & post45panel==1, fe cluster(country_id)
estimates store b1
estout a b a1 b1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)

**********
**Fig A3**
**********

*OMITTING REGIONS GDP
drop _est_*
*no EEur
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=1, fe cluster(country_id)
estimates store a1
*No latan
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=2, fe cluster(country_id)
estimates store a2
**no MENA
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=3, fe cluster(country_id)
estimates store a3
*No SS AFR
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=4, fe cluster(country_id)
estimates store a4
*No west
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=5, fe cluster(country_id)
estimates store a5
*No Asia
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if e_regionpol_6C!=6, fe cluster(country_id)
estimates store a6

xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
coefplot a1 a2 a3 a4 a5 a6 a, nolabel keep(v2x_gender) vertical yline(0) byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white)) 


*OMITTING REGIONS TFP
drop _est_*
*no EEur
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=1, fe cluster(country_id)
estimates store a1
*No latan
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=2, fe cluster(country_id)
estimates store a2
**no MENA
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=3, fe cluster(country_id)
estimates store a3
*No SS AFR
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=4, fe cluster(country_id)
estimates store a4
*No west
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=5, fe cluster(country_id)
estimates store a5
*No Asia
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=6, fe cluster(country_id)
estimates store a6

xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a
coefplot a1 a2 a3 a4 a5 a6 a, nolabel keep(v2x_gender) vertical yline(0) byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white)) 




**********
**Fig A4**
**********

**Estimate 100 year time series

drop _est_*
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1789 & year<1890, fe cluster(country_id)
estimates store a1
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1799 & year<1900, fe cluster(country_id)
estimates store a2
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1809 & year<1910, fe cluster(country_id)
estimates store a3
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1819 & year<1920, fe cluster(country_id)
estimates store a4
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1829 & year<1930, fe cluster(country_id)
estimates store a5
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1839 & year<1940, fe cluster(country_id)
estimates store a6
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1849 & year<1950, fe cluster(country_id)
estimates store a7
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1859 & year<1960, fe cluster(country_id)
estimates store a8
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1869 & year<1970, fe cluster(country_id)
estimates store a9
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1879 & year<1980, fe cluster(country_id)
estimates store a10
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1889 & year<1990, fe cluster(country_id)
estimates store a11
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1899 & year<2000, fe cluster(country_id)
estimates store a12
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year if year>1909 & year<2010, fe cluster(country_id)
estimates store a13
xtreg F5.s_far_Maddison_gdppc_1990_estima v2x_gender s_far_Maddison_gdppc_1990_estima i.year, fe cluster(country_id)
estimates store a
coefplot a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a, nolabel keep(v2x_gender) vertical yline(0) byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white)) 

xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1859 & year<1960, fe cluster(country_id)
estimates store a8
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1869 & year<1970, fe cluster(country_id)
estimates store a9
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1879 & year<1980, fe cluster(country_id)
estimates store a10
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1889 & year<1990, fe cluster(country_id)
estimates store a11
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1899 & year<2000, fe cluster(country_id)
estimates store a12
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1909 & year<2010, fe cluster(country_id)
estimates store a13
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a
coefplot a8 a9 a10 a11 a12 a13 a, nolabel keep(v2x_gender) vertical yline(0) byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white)) 


**********
**Tab A10**
**********
**** ECM
xtreg d.s_far_Maddison_gdppc_1990_estima l.s_far_Maddison_gdppc_1990_estima d.v2x_gender l.v2x_gender i.year, fe cluster(country_id)
estimates store a
xtreg d.s_far_Maddison_gdppc_1990_estima l.s_far_Maddison_gdppc_1990_estima d.v2x_gender d.v2x_polyarchy l.v2x_gender l.v2x_polyarchy i.year, fe cluster(country_id)
estimates store b
preserve
gen period = 5 *  floor(year/5)
collapse s_far_Maddison_gdppc_1990_estima v2x_gender v2x_polyarchy s_tfp_lntfpi, by(country_id period)
by country_id: gen year=_n
xtset country_id year
xtreg d.s_far_Maddison_gdppc_1990_estima l.s_far_Maddison_gdppc_1990_estima d.v2x_gender l.v2x_gender i.year, fe cluster(country_id)
estimates store c
xtreg d.s_far_Maddison_gdppc_1990_estima l.s_far_Maddison_gdppc_1990_estima d.v2x_gender d.v2x_polyarchy l.v2x_gender l.v2x_polyarchy i.year, fe cluster(country_id)
estimates store d
restore
estout a b c d , cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* 2* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**********
**Tab A11**
**********



xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1859 & year<1960, fe cluster(country_id)
estimates store a8
by country_id, sort: egen pre45paneltfp = max(_est_a8)
sort country_id year
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1909 & year<2010, fe cluster(country_id)
estimates store a13
by country_id, sort: egen post45paneltfp = max(_est_a13)
sort country_id year
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1859 & year<1960 &pre45paneltfp==1 & post45paneltfp==1, fe cluster(country_id)
estimates store a81
xtreg F5.s_tfp_lntfpi v2x_gender  s_tfp_lntfpi i.year if year>1909 & year<2010&pre45paneltfp==1 & post45paneltfp==1, fe cluster(country_id)
estimates store a131
estout a8 a13 a81 a131, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1*  _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)


**********
**Fig A5**
**********

xtreg L20.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a1
xtreg L15.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a2
xtreg L10.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a
xtreg L5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store b
xtreg L3.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store c
xtreg L1.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store d
xtreg s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store e
xtreg F1.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store f
xtreg F3.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store g
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store h
xtreg F10.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store i
xtreg F15.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store i2
xtreg F20.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store i1

coefplot (a1, label(t-20)) (a1, label(t-15)) (a, label(t-10)) (b, label(t-5)) (c, label(t-3)) (d, label(t-1)) (f, label(t+1)) (g, label(t+3)) (h, label(t+5)) (i, label(t+10)) (i1, label(t+10)) (i2, label(t+20)), bylabel(Growth measured t years after) keep(v2x_gender) vertical yline(0)  graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))


**********
**Tab A12**
**********

xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store a
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year s_mil_van_familyf, fe cluster(country_id)
estimates store b
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year e_miurbani, fe cluster(country_id)
estimates store c
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year yearsindeptot, fe cluster(country_id)
estimates store d
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year intwar10yr, fe cluster(country_id)
estimates store e
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year last10domestic, fe cluster(country_id)
estimates store f


estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
 


**********
**Tab A13**
**********
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi  i.year, fe cluster(country_id)
estimates store a
xtreg F10.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi L5.s_tfp_lntfpi  L6.s_tfp_lntfpi L7.s_tfp_lntfpi L8.s_tfp_lntfpi L9.s_tfp_lntfpi   i.year, fe cluster(country_id)
estimates store a1
xtreg F10.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi L5.s_tfp_lntfpi  L6.s_tfp_lntfpi L7.s_tfp_lntfpi L8.s_tfp_lntfpi L9.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store b1

save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store f
xtreg F2.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store g
xtreg F.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi L2.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store f1
xtreg F2.s_tfp_lntfpi v2x_gender s_tfp_lntfpi L.s_tfp_lntfpi L2.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store g1

estout a b a1 b1 f g f1 g1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear

**********
**Tab A14**
**********

xtreg F5.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi  i.year, fe cluster(country_id)
estimates store a
xtreg F10.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store b
xtreg F5.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi L5.s_tfp_lntfpi  L6.s_tfp_lntfpi L7.s_tfp_lntfpi L8.s_tfp_lntfpi L9.s_tfp_lntfpi   i.year, fe cluster(country_id)
estimates store a1
xtreg F10.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi  L2.s_tfp_lntfpi L3.s_tfp_lntfpi L4.s_tfp_lntfpi L5.s_tfp_lntfpi  L6.s_tfp_lntfpi L7.s_tfp_lntfpi L8.s_tfp_lntfpi L9.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store b1

save "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", replace

drop if year != 2015 & year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 & year != 1895 & year != 1890 & year != 1885 & year != 1880 & year != 1875 & year != 1870 & year != 1865 & year != 1860 & year != 1855 & year != 1850 & year != 1845 & year != 1840 & year != 1835 & year != 1830 & year != 1825 & year != 1820 & year != 1815 & year != 1810 & year != 1805 & year != 1800 & year != 1795 & year != 1790 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
fvset base 1790 trend

xtreg F.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store f
xtreg F2.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store g
xtreg F.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi L2.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store f1
xtreg F2.s_tfp_lntfpi v2x_gender v2x_polyarchy s_tfp_lntfpi L.s_tfp_lntfpi L2.s_tfp_lntfpi i.year, fe cluster(country_id)
estimates store g1

estout a b a1 b1 f g f1 g1, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
use "C:\Users\carlhk\Dropbox\human rights and inclusion\gender and growth\Replication data WD\Replication_data_WD_annual.dta", clear


**********
**Fig A6**
**********

**Top panel
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year if year<1946, fe cluster(country_id)
estimates store a
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi   i.year if year>1945, fe cluster(country_id)
estimates store b
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi   i.year if e_regionpol_6C==5, fe cluster(country_id)
estimates store c
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi i.year if e_regionpol_6C!=5, fe cluster(country_id)
estimates store d
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi   i.year if democracy==0, fe cluster(country_id)
estimates store e
xtreg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  i.year if democracy==1, fe cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(1* _cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (a, label(1789-1945)) (b, label(1946-2010)) (c, label(Western)) (d, label(Non-Western)) (e, label(Autocratic)) (f, label(Democratic)), bylabel(Benchmark)  /// 
||, keep(v2x_gender) vertical yline(0)   byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
*Some manual formatting

**Bottom panel
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  if year<1946, cluster(country_id)
estimates store a
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi   if year>1945, cluster(country_id)
estimates store b
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi    if e_regionpol_6C==5, cluster(country_id)
estimates store c
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi    if e_regionpol_6C!=5, cluster(country_id)
estimates store d
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi  if democracy==0, cluster(country_id)
estimates store e
reg F5.s_tfp_lntfpi v2x_gender s_tfp_lntfpi    if democracy==1, cluster(country_id)
estimates store f
estout a b c d e f, cells(b(star fmt(%9.3f)) t(par fmt(%9.3f))) drop(_cons) rename(s_mil_loggdp Ln_GDP_pc s_bmr_democracy BMR_regime v2clrspct Impartial_public_admin s_bmr_democracy_trans BMR_democratic_transition v2x_Polyarchy Polyarchy) starlevels (* 0.10 ** 0.05 *** 0.01) stats (N r2)style (tex)
coefplot (a, label(1789-1945)) (b, label(1946-2010)) (c, label(Western)) (d, label(Non-Western)) (e, label(Autocratic)) (f, label(Democratic)), bylabel(Benchmark)  /// 
||, keep(v2x_gender) vertical yline(0)   byopts(colfirst) graphregion(fcolor(white) ifcolor(white)) plotregion(fcolor(white) ifcolor(white))
*Some manual formatting

